package xhwl.insurance.http.api;

import com.google.gson.Gson;

import okhttp3.RequestBody;
import rx.Observable;
import xhwl.android.common.util.SPUtil;
import xhwl.insurance.http.ApiService;
import xhwl.retrofitrx.BaseApi;


public class FetchSalesCardDataApi extends BaseApi {
    FetchSalesCardDataReq req;

    public FetchSalesCardDataApi() {
        req = new FetchSalesCardDataReq();
    }

    @Override
    protected Observable getObservable() {
        RequestBody requestBody = RequestBody.create(okhttp3.MediaType.parse("application/json; charset=utf-8"), new Gson().toJson(req));
        return retrofit.create(ApiService.class).fetchSalesCardData(requestBody);
    }

    class FetchSalesCardDataReq {
        /**
         * page_num : 0
         * link_mobile : 13263266381
         */

        private String member_id;

        public FetchSalesCardDataReq() {
            this.member_id = SPUtil.getPersonInfoSp().getString(SPUtil.SPPersonInfo.MEMBER_ID,"");
        }
    }
}
